﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Idenmpotency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yarp.ReverseProxy.Idenmptency
{
    /// <summary>
    /// Yarp幂等性请求
    /// </summary>
    public class YarpIdenmpotencyRequest : IAspIdenmpotencyRequest
    {
        public HttpContext HttpContext { get; private set; }
        public RequestDelegate Next { get; private set; }
        public string Key { get; private set; }
        public YarpIdenmpotencyRequest(HttpContext context, RequestDelegate next, string key)
        {
            HttpContext = context;
            Next = next;
            Key = key?.ToLowerInvariant();
        }
    }

}
